﻿'
' Boogaloo® - http://www.mindfly.com
' Copyright (c) 2008
' by Mindfly, Inc.
'
' Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 
' documentation files (the "Software"), to deal in the Software without restriction, including without limitation 
' the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and 
' to permit persons to whom the Software is furnished to do so, subject to the following conditions:
'
' The above copyright notice and this permission notice shall be included in all copies or substantial portions 
' of the Software.
'
' THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
' INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
' DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
' SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
' SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
' WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
' THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.



Namespace BLL

    Public Interface ICSSManifest

        ''' <summary>
        ''' Dictionary of list of stylesheets described in the manifest xml file
        ''' String keys indicate the conditional comment grouping with 'none' used as
        ''' standard link.  
        ''' 
        ''' Only stylesheets in the list with the 'none' key are used in HttpHandler
        ''' grouping
        ''' </summary>
        ReadOnly Property stylesheets() As Dictionary(Of String, List(Of ThemeCSSStyleSheet))

        ''' <summary>
        ''' Searchs the manifest stylesheet dictionary lists for a css file of name provided.
        ''' cssfile is simply the name of the file ex. style.css
        ''' </summary>
        Function Contains(ByVal cssfile As String) As Boolean


        ''' <summary>
        ''' Combines the contents of each stylesheet into a single string. The qs_key arguement is the actual conditional comment test
        ''' with spaces and brackets removed
        ''' </summary>
        Function GetConditionStylesheetGroupContentsByQueryStringGroupKey(ByVal qs_key As String) As String

        ''' <summary>
        ''' Returns a list of ThemeCSSStyleSheet from a condition block.  The key arguement is the actual conditional comment test
        ''' with spaces and brackets removed
        ''' </summary>
        Function GetConditionByQueryStringGroupKey(ByVal key As String) As List(Of ThemeCSSStyleSheet)

        ''' <summary>
        ''' Returns a string containing the new header link tag construct
        ''' HtmlLink(s) will either be directly to the actual css file (only ordered) or
        ''' to the css.axd?theme={0}&amp;cond={1} HttpHandler if the theme is to be bundled
        ''' </summary>
        Function GetHeaderHtml() As String

        ''' <summary>
        ''' Indicates whether or not the CSSHandler should remove whitespace prior to writting
        ''' to response
        ''' </summary>
        Property removewhitespace() As Boolean

        ''' <summary>
        ''' Indicates whether or not the CSSHandler should attempt to compress the stylesheets
        ''' </summary>
        Property compress() As Boolean


        ''' <summary>
        ''' Indicates whether or not the ASP.NET Theme's css style sheets should be bundled 
        ''' into a single request (CSSHandler - css.axd)
        ''' </summary>
        Property bundle() As Boolean

        ''' <summary>
        ''' Name of the ASP.NET Theme for which this is a manifest
        ''' </summary>
        Property theme() As String

        ''' <summary>
        ''' Physical path to xml manifest file in the App_Theme directory
        ''' </summary>
        ReadOnly Property path() As String

        ''' <summary>
        ''' Physical path to the App_Theme directory
        ''' </summary>
        ReadOnly Property path_theme() As String

        ''' <summary>
        ''' Physical path to the manifest directory
        ''' </summary>
        ReadOnly Property path_manifest() As String

        ''' <summary>
        ''' Indicates whether or not the manifest has been validated against
        ''' the actual ASP.NET directory structure to assert css files exist or
        ''' new ones have not been added.
        ''' </summary>
        ReadOnly Property validated() As Boolean



    End Interface

End Namespace